<?php
	session_start();
	require('../core/config.php');
	if(isset($_SESSION['islogin'])){
		if(isset($_GET['editor'])){
			$article = getArticle($_GET['editor']);
			if(!$article)
				exit();
		}
		$artkindlist = getAirtkindList();
		
		$smarty->assign('artkindlist',$artkindlist);
		$smarty->assign('subtext',$subtext);
		if(isset($article)){
			$smarty->assign('time',turnTimeToDate($article['pubtime'],2));
			$smarty->assign('article',$article);
		}
		$smarty->display($_config['root']."admin/html/editor.html");
	}else{
		include('login.php');
	}
?>